import {
  BufferGeometry,
  Camera,
  Geometry,
  Group,
  Material,
  Scene,
  Texture,
  Vector3,
  WebGLRenderer,
} from 'three-legacy';

export type FunctionOnBeforeRender = (
  renderer: WebGLRenderer,
  scene: Scene,
  camera: Camera,
  geometry: Geometry | BufferGeometry,
  material: Material,
  group: Group,
) => void;

export enum ConstraintType {
  None = 0, // 空约束
  Distance = 1, // 距离
  Angle = 2, // 角度
  Coincident = 3, // 同轴
  Parallel = 4, // 平行
  Perpendicular = 5, // 垂直
  Symmetric = 6, // 对称
  Fix = 7, //固定
  Concentric = 8, // 同心 针对球体
  Tangent = 9, // 相切
  Coincidence = 10, // 相合
}

export interface CreateIconAttrs {
  texture: Texture;
  iconOffset: Vector3;
  iconHeight: number;
  keepPosition?: Vector3;
}
